package com.idp.web.test.service.impl;
import com.idp.web.test.service.OrderItemService;
import com.idp.web.test.dao.OrderItemDao;
import com.idp.web.test.entity.OrderItem;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.idp.common.persistence.Page;
import com.idp.common.util.ResourceUtils;

/**
 * 
 * 订单清单service实现类
 * 
 * <pre>
 * 	历史记录：
 * 	2017-06-16 Amber
 * 	新建文件
 * </pre>
 * 
 * @author 
 * <pre>
 * SD
 * 	Amber
 * PG
 *	Amber
 * UT
 *
 * MA
 * </pre>
 * @version $Rev$
 *
 * <p/> $Id$
 *
 */
@Service("orderItemService")
public class OrderItemServiceImpl implements OrderItemService {

	@Resource
	private OrderItemDao orderItemDao;
	
	@Override
	public Page<OrderItem> findByPage(OrderItem orderItem, Page<OrderItem> page) {

		page.setResult(orderItemDao.find(orderItem, page));
		
		return page;
	}
	
	@Override
	public List<OrderItem> findBySearch(OrderItem orderItem) {

		return orderItemDao.find(orderItem);
	}
	
	@Override
	public OrderItem getById(Integer id) {

		return orderItemDao.getById(id);
	}

	@Override
	public void add(OrderItem orderItem) {

		orderItemDao.add(orderItem);
	}
	
	@Override
	public void update(OrderItem orderItem) {

		orderItemDao.update(orderItem);
	}

	@Override
	public void delete(Integer id) {

		orderItemDao.delete(id);
	}
 	
}